﻿@{ 
    if (Request.IsAuthenticated)
    {
        String[] values = User.Identity.Name.Split(new Char[] { '#' });
        string displayName = values[1].ToString();
        string displayProfile = values[3].ToString();
        int profileId = int.Parse(values[2]);
        string displayNivel = values[4].ToString();
      
        if(profileId == (int)(XtremBiking.Logica.Enumerados.Usuarios.Perfil.Administrador)){
            <span class="sr-only"><b>Bienvenido: @displayName (@displayProfile)</b></span><br />
            <span class="sr-only"><b>Fecha: @DateTime.Now.ToShortDateString()</b> </span>
    
    
            <div class="btn-toolbar">
                    <div class="btn-group" role="group">
                           @Html.ActionLink("Home","Index","Home", null, new { @class="btn btn-primary  btn-mini navbar-btn" })
                    </div>

                <!--Default buttons with dropdown menu-->
                <div class="btn-group" role="group">
                    <button type="button" class="btn btn-primary btn-mini dropdown-toggle">Cuenta</button>
                    <button type="button" data-toggle="dropdown" class="btn btn-primary btn-mini dropdown-toggle"><span class="caret"></span></button>
                    <ul class="dropdown-menu">
                        <li><a href="../User/ChangePassword">Cambiar Clave</a></li>
                        <li><a href="#">Cambiar Mail</a></li>
                        <li><a href="../User/PersonalInfo">Ficha Personal</a></li>
                       @* <li class="divider"></li>
                        <li><a href="#">Salir</a></li>*@
                    </ul>
                </div>
                <!--Primary buttons with dropdown menu-->
                <div class="btn-group" role="group">
                    <button type="button" class="btn btn-primary  btn-mini">Usuarios</button>
                    <button type="button" data-toggle="dropdown" class="btn btn-primary  btn-mini dropdown-toggle"><span class="caret"></span></button>
                    <ul class="dropdown-menu">
                        <li><a href="../User/Index">Administrar</a></li>
                        <li><a href="../Usuarios/">Fichas</a></li>
                        @*<li><a href="../Usuarios/">Baja</a></li>*@
                        @*<li class="divider"></li>
                        <li><a href="#">Separated link</a></li>*@
                    </ul>
                </div>
                <div class="btn-group" role="group">
                    <button type="button" class="btn btn-primary  btn-mini">Rutinas</button>
                    <button type="button" data-toggle="dropdown" class="btn btn-primary  btn-mini dropdown-toggle"><span class="caret"></span></button>
                    <ul class="dropdown-menu">
                        <li><a href="../Routine/Create">Crear</a></li>
                        <li><a href="../Rutinas/">Modificar</a></li>
                        <li><a href="../Rutinas/">Eliminar</a></li>
                        <li><a href="../Rutinas/">Asignar</a></li>
                        @*<li class="divider"></li>
                        <li><a href="#">Separated link</a></li>*@
                    </ul>
                </div>
                <!--Info buttons with dropdown menu-->
                <div class="btn-group" role="group">
                    <button type="button" class="btn btn-primary  btn-mini">Reportes</button>
                    <button type="button" data-toggle="dropdown" class="btn btn-primary  btn-mini dropdown-toggle"><span class="caret"></span></button>
                    <ul class="dropdown-menu">
                        <li><a href="#">Action</a></li>
                        <li><a href="#">Another action</a></li>
                        <li class="divider"></li>
                        <li><a href="#">Separated link</a></li>
                    </ul>
                </div>
                <div class="btn-group" role="group">
                   @Html.ActionLink("Salir","LogOut","Home", null, new { @class="btn btn-primary  btn-mini navbar-btn" })
                </div>
            </div>
    
        }
        else
        {
            <span class="sr-only">Bienvenido: <b>@displayName</b>.</span><br />
            <span class="sr-only">Su nivel actual es:<b> @displayNivel</b> </span><br />
            <span class="sr-only">Fecha:<b> @DateTime.Now.ToShortDateString()</b></span>
            
            <div class="btn-toolbar">
                    <div class="btn-group">
                       @Html.ActionLink("Home","Index","Home", null, new { @class="btn btn-primary btn-lg navbar-btn btn-mini" })
                    </div>
                    <div class="btn-group">
                        <button type="button" class="btn btn-primary btn-mini">Cuenta</button>
                        <button type="button" data-toggle="dropdown" class="btn btn-primary dropdown-toggle btn-mini"><span class="caret"></span></button>
                            <ul class="dropdown-menu">
                                <li><a href="../User/ChangePassword">Cambiar Clave</a></li>
                                <li><a href="#">Cambiar Mail</a></li>
                                <li><a href="../User/PersonalInfo">Ficha Personal</a></li>
                                @*<li class="divider"></li>
                                <li><a href="#">Salir</a></li>*@
                            </ul>
                    </div>

                     <div class="btn-group">
                        <button type="button" class="btn btn-primary btn-mini">Entrenamiento</button>
                        <button type="button" data-toggle="dropdown" class="btn btn-primary dropdown-toggle btn-mini"><span class="caret"></span></button>
                            <ul class="dropdown-menu">
                                <li><a href="../User/CreateGoal">Objetivos</a></li>
                                <li class="divider"></li>
                                <li><a href="#">Rutinas</a></li>
                                <li><a href="#">Devoluciones</a></li>
                                 @*<li><a href="#"></a></li>*@
                            </ul>
                    </div>
                 <div class="btn-group ">
                    @Html.ActionLink("Salir","LogOut","Home", null, new { @class="btn btn-primary btn-lg navbar-btn btn-mini" })
      
                 </div>
            </div>
        }
     }     
     }